:root {
    --primary: #00a884;
    --primary-light: #00a88433;
    --bg: #f5f5f5;
    --card-bg: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: '微软雅黑', sans-serif;
    font-size: small;
}

body {
    background: var(--bg);
    position: relative;
    min-height: 100vh;
    padding: 20px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

select,
input {
    width: 100%;
    padding: 8px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
}

/* 标题栏样式 */
.title-bar {
    background: linear-gradient(135deg, var(--primary), #008c72);
    color: white;
    padding: 20px;
    margin: -20px -20px 20px -20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.title-content {
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.title-text {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
}

/* 表格相关样式 */
.table-container {
    margin-top: 15px;
    /* height: calc(100vh - 550px); */
    overflow: auto;
    border: 1px solid #eee;
}

.fixed-table {
    border-collapse: collapse;
    text-align: center;
    white-space: nowrap;
    width: auto;
}

.fixed-table th,
.fixed-table td {
    padding: 12px;
    border: 1px solid #eee;
    background: var(--card-bg);
}

.fixed-table th {
    background: var(--primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 2;
}

.fixed-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f8f8f8;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    gap: 5px;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    text-decoration: none;
    z-index: 1000;
}

/* 下拉框容器 */
.select-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
}

/* 下拉框本体 */
.custom-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: var(--card-bg);
    appearance: none;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s;
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.2);
}

.custom-select option {
    padding: 10px;
    background: var(--card-bg);
}

/* 表格标题容器 */
.table-title {
    display: flex;
    align-items: center;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--primary);
}

/* 标题文字样式 */
.table-title-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    position: relative;
    padding-left: 28px;
}

.table-title-text::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
}

.custom-select option:hover {
    background: var(--primary-light);
}

/* 新增固定头部容器 */
.fixed-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 调整表格容器高度计算 */
.scrollable-content {
    height: calc(100vh - 240px);
    /* 根据实际高度调整 */
    overflow: auto;
    margin-top: -15px;
    /* 抵消顶部padding */
    padding-top: 15px;
}

/* 适配移动端 */
@media (max-width: 768px) {
    .scrollable-content {
        height: calc(100vh - 210px);
    }
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    /* background: var(--primary); */
    border-radius: 3px;
}

@media (max-width: 768px) {
    .custom-select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .table-title-text {
        font-size: 1.1rem;
        padding-left: 10px;
    }

    .table-title-text::before {
        width: 18px;
        height: 18px;
    }
}

/* 加载动画容器 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* 旋转动画 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 15px;
    color: var(--primary);
    font-weight: bold;
}